<!DOCTYPE html>
<html lang="en"
      xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity5">

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>发改局</title>

  <!-- Google Font: Source Sans Pro -->
  <link rel="stylesheet"
        href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
  <!-- Font Awesome Icons -->
<!--  <link rel="stylesheet" href="../plugins/fontawesome-free/css/all.min.css">-->
  <!-- IonIcons -->
  <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
  <!-- Theme style -->
<!--  <link rel="stylesheet" href="../dist/css/adminlte.min.css">-->
<!--  &lt;!&ndash; Ekko Lightbox &ndash;&gt;-->
<!--  <link rel="stylesheet" href="../plugins/ekko-lightbox/ekko-lightbox.css">-->


  <!-- Font Awesome Icons -->
  <link rel="stylesheet" href="../../plugins/fontawesome-free/css/all.min.css">
  <!-- IonIcons -->
  <!-- Theme style -->
  <link rel="stylesheet" href="../../dist/css/adminlte.min.css">
  <!-- Ekko Lightbox -->
  <link rel="stylesheet" href="../../plugins/ekko-lightbox/ekko-lightbox.css">

</head>


<body class="hold-transition sidebar-mini">
<div class="wrapper">

  <!-- 主内容容器 -->
  <div class="content-wrapper">

    <!-- 容器头标题 -->
    <div class="content-header">
      <div class="container-fluid">
        <div class="row mb-2">

          <div class="col-sm-6">
            <h1 class="m-0">企业详情</h1>
          </div>

          <div class="col-sm-6">
            <ol class="breadcrumb float-sm-right">
              <li class="breadcrumb-item"><a href="#">首页</a></li>
              <li class="breadcrumb-item active">企业详情</li>
            </ol>
          </div>

        </div>
      </div>
    </div>

    <!-- 主题内容正文 -->
    <div class="content">
      <div class="container-fluid">

        <div class="row">
          <div class="col-lg-12">
            <!-- 添加div -->
            <div class="card card-primary">

              <!-- 卡片头部 -->
              <div class="card-header">
                <h3 class="card-title">企业详情</h3>
              </div>

              <!-- 表单开始 -->
              <form id="formbody">
                <div class="card-body">

                  <div class="row">
                    <div class="col-lg-6">

                      <div class="form-group">
                        <label for="enName">企业名称</label>
                        <input type="text" class="form-control" th:value="${data.enName}" id="enName" name="enName" placeholder="企业名称" readonly>
                      </div>

                      <div class="form-group" th:if="${data.rId != null}">
                        <label>父企业</label>
                        <input class="form-control" id="parentEn" name="rId" th:value="${parent.enName}" readonly/>
                      </div>

                      <div class="form-group">
                        <label for="en_persion_name">企业负责人姓名</label>
                        <input type="text" class="form-control" id="en_persion_name" th:value="${data.enPersionName}" name="enPersionName"  placeholder="企业负责人姓名" readonly>
                      </div>

<!--                      <div class="form-group">-->
<!--                        <label for="industry">所属行业</label>-->
<!--                        <input type="text" class="form-control" id="industry" th:value="${data.industry}" name="industry"  placeholder="所属行业" readonly>-->
<!--                      </div>-->

<!--                      <div class="form-group">-->
<!--                        <label for="totalInvestment">总投资(万元)</label>-->
<!--                        <input type="number" class="form-control" id="totalInvestment" th:value="${data.totalInvestment}" name="totalInvestment" placeholder="总投资" readonly>-->
<!--                      </div>-->

                      <div class="form-group">
                        <label >企业执照</label>

                          <div class="input-group">
                            <div class="row">
                              <div class="col-lg-12">
                                <a th:href="${#httpServletRequest.getScheme() + '://' + #httpServletRequest.getServerName() + ':' + #request.getServerPort()+'/'+data.getLicenseImg()}" data-toggle="lightbox" data-title="图片预览">
                                  <img th:src="${#httpServletRequest.getScheme() + '://' + #httpServletRequest.getServerName() + ':' + #request.getServerPort()+'/'+data.getLicenseImg()}" class="img-fluid mb-2" alt="营业执照"
                                       style="border: 1px solid black; padding: 10px; width: 180px;"/>
                                </a>

                              </div>

                            </div>
                          </div>

                      </div>

                      <div class="form-check" style="margin-bottom: 10px">
                        <input type="checkbox" class="form-check-input" th:checked="${data.enable}" id="enable" name="enable" readonly>
                        <label class="form-check-label" for="enable">是否运营</label>
                      </div>
                    </div>

                    <div class="col-lg-6">



                      <div class="form-group">
                        <label for="en_tel">企业联系电话</label>
                        <input type="text" class="form-control" id="en_tel" name="enTel" th:value="${data.enTel}" placeholder="企业联系电话" readonly>
                      </div>

                      <div class="form-group">
                        <label for="project_report_persion">项目上报人</label>
                        <input type="text" class="form-control" id="project_report_persion" th:value="${data.projectReportPerson}" name="projectReportPerson" placeholder="项目上报人" readonly>
                      </div>

                      <div class="form-group">
                        <label for="project_report_persion_post">项目上报人职务</label>
                        <input type="text" class="form-control" id="project_report_persion_post" th:value="${data.projectReportPersonPost}" name="projectReportPersonPost"  placeholder="项目上报人职务" readonly>
                      </div>

                      <div class="form-group">
                        <label for="project_report_persion_tel">项目上报人电话</label>
                        <input type="tel" class="form-control" id="project_report_persion_tel" th:value="${data.projectReportPersonTel}" name="projectReportPersonTel" placeholder="项目上报人电话" readonly>
                      </div>

                      <div class="form-group" th:if="${#httpSession.getAttribute('role_id') == 1}">
                        <label>关联的用户</label>
                        <input class="form-control" id="userId" name="userId" th:value="${user.username}" readonly>

                      </div>
                    </div>
                </div>

                <!-- 添加按钮 -->
                <div class="card-footer">
                  <button type="button" class="btn btn-primary" id="pre_btn">返回上一页</button>
                </div>
                </div>
              </form>

            </div>

          </div>

          <div class="col-lg-6">
          </div>

        </div>
      </div>
    </div>
  </div>

  <aside class="control-sidebar control-sidebar-dark">
  </aside>

  <!-- 版权信息 -->
  <footer class="main-footer">
    <strong>Copyright &copy; 2021 <a href="http://www.chengzhouyun.com/" target="_blank">ChengZhouYun</a>.</strong>
    All rights reserved.
    <div class="float-right d-none d-sm-inline-block">
      <b>Version</b> 1.0
    </div>
  </footer>

</div>

<!-- REQUIRED SCRIPTS -->
<!-- jQuery -->
<!--<script src="../plugins/jquery/jquery.min.js"></script>-->
<!--&lt;!&ndash; Bootstrap &ndash;&gt;-->
<!--<script src="../plugins/bootstrap/js/bootstrap.bundle.min.js"></script>-->
<!--&lt;!&ndash; AdminLTE &ndash;&gt;-->
<!--<script src="../dist/js/adminlte.js"></script>-->

<!--&lt;!&ndash; OPTIONAL SCRIPTS &ndash;&gt;-->
<!--<script src="../plugins/chart.js/Chart.min.js"></script>-->
<!--&lt;!&ndash; AdminLTE for demo purposes &ndash;&gt;-->
<!--<script src="../dist/js/demo.js"></script>-->
<!--&lt;!&ndash; Ekko Lightbox &ndash;&gt;-->
<!--<script src="../plugins/ekko-lightbox/ekko-lightbox.min.js"></script>-->
<!--&lt;!&ndash; Filterizr&ndash;&gt;-->
<!--<script src="../plugins/filterizr/jquery.filterizr.min.js"></script>-->
<!--&lt;!&ndash; AdminLTE dashboard demo (This is only for demo purposes) &ndash;&gt;-->
<!--<script src="../dist/js/pages/dashboard3.js"></script>-->


<!-- REQUIRED SCRIPTS -->
<!-- jQuery -->
<script src="../../plugins/jquery/jquery.min.js"></script>
<!-- Bootstrap -->
<script src="../../plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- AdminLTE -->
<script src="../../dist/js/adminlte.js"></script>

<!-- OPTIONAL SCRIPTS -->
<script src="../../plugins/chart.js/Chart.min.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="../../dist/js/demo.js"></script>
<!-- Ekko Lightbox -->
<script src="../../plugins/ekko-lightbox/ekko-lightbox.min.js"></script>
<!-- Filterizr-->
<script src="../../plugins/filterizr/jquery.filterizr.min.js"></script>
<!-- AdminLTE dashboard demo (This is only for demo purposes) -->
<!--<script src="../../dist/js/pages/dashboard3.js"></script>-->
</body>

<script th:inline="javascript">

  $(function () {

    // 返回上一页
    $("#pre_btn").on("click",function(){
      window.history.back();
    })

    // 图片选择事件
    $("#exampleInputFile").change("value",function(){
      var value = $("#exampleInputFile").val();
      if (value != undefined && value != ''){
        $("#uploadFileText").text(value);
      }
    })



    // 营业执照图片预览处理
    $(document).on('click', '[data-toggle="lightbox"]', function (event) {
      event.preventDefault();
      $(this).ekkoLightbox({
        alwaysShowClose: true
      });
    });


    $('.btn[data-filter]').on('click', function () {
      $('.btn[data-filter]').removeClass('active');
      $(this).addClass('active');
    });

  })
</script>

</html>
